﻿using BussinessObject.ObjectTwo;
using Class_Entity.ObjectTwo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectHK3
{
    public partial class CheckStatus : System.Web.UI.Page
    {
        B_Search bs = new B_Search();
        Orders or = new Orders();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loadData();
            }
        }
        public void loadData()
        {
            try
            {
                or = bs.loadStatus( Session["status"].ToString());

                Label42.Text = or.ORDER_NUMBER.ToString();
                Label43.Text = or.STATUS.ToString();
                Label44.Text = or.SENDER_NAME.ToString();
                Label45.Text = or.ORDER_DATE.ToString();
                Label35.Text = or.RECEIVER_NAME.ToString();
                Label36.Text = or.RECEIVE_DATE.ToString();
                Label37.Text = or.MAIL_CODE.ToString();
                Label38.Text = or.WEIGHT.ToString();
                Label39.Text = or.DESCRIPTION.ToString();
                Label40.Text = or.TOTAL_DELIVERY_FEE.ToString();
            }
            catch (Exception ex)
            {
                Label1.Text = "This information does not exist !";
                Label22.Visible = false;
                Label23.Visible = false;
                Label24.Visible = false;
                Label25.Visible = false;
                Label26.Visible = false;
                Label27.Visible = false;
                Label28.Visible = false;
                Label30.Visible = false;
                Label29.Visible = false;
                Label42.Visible = false;
                Label43.Visible = false;
                Label44.Visible = false;
                Label45.Visible = false;
                Label35.Visible = false;
                Label36.Visible = false;
                Label37.Visible = false;
                Label38.Visible = false;
                Label39.Visible = false;
                Label40.Visible = false;
                Label41.Visible = false;
               
            }


        }
    }
}